from todo_api_project.base.mybase import Tools


class QueryTask_model(Tools):

    # 定义路径
    path = '/task/info'

    # 发送注册请求
    def QueryTask_action(self,hb,status=0):
        mydata = {
            "status": status,

        }
        res = self.huihua.get(url=self.hosturl+self.path,params=mydata,headers=hb)
        return res.json()

from todo_api_project.api.login_api import login_model

import requests
s = requests.session()
reg = login_model(huihua=s)
msg = reg.login_action(usr='ueuquu1342',pwd='afhahfhai34')
getuserid = msg['userId']
getusertoke = msg['userToken']
hb = {'userid':getuserid,'userToken':getusertoke}
QueryTask = QueryTask_model(huihua=s)
msg = QueryTask.QueryTask_action(status=0,hb=hb)
print(msg)
